<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>File Source for dbpedia.php</title>
	<link rel="stylesheet" type="text/css" href="../media/style.css">
	<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
	<script src="media/a.js"></script>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
	<td class="header-top-left"><img src="../media/logo.png" border="0" alt="phpDocumentor " /></td>
    <td class="header-top-right">Examples<br /><div class="header-top-right-subpackage"></div></td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td colspan="2" class="header-menu">
      
                                      
                                    		[ <a href="../classtrees_Examples.html" class="menu">class tree: Examples</a> ]
		[ <a href="../elementindex_Examples.html" class="menu">index: Examples</a> ]
            [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="195" class="menu">
		<div class="package-title">Examples</div>
  <div class="package">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
	</div>
      <b>Packages:</b><br />
  <div class="package">
              <a href="../li_QueryPath.html">QueryPath</a><br />
              <a href="../li_Examples.html">Examples</a><br />
              <a href="../li_Tests.html">Tests</a><br />
      	</div>
      <br />
                        <br />
                      </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file dbpedia.php</h1>
<p>Documentation is available at <a href="../Examples/_examples---dbpedia.php.html">dbpedia.php</a></p>
<div class="src-code"><span class="php">
<ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">&nbsp;*&nbsp;Example&nbsp;of&nbsp;grabbing&nbsp;and&nbsp;parsing&nbsp;Linked&nbsp;Data&nbsp;from&nbsp;DBPedia.</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;example&nbsp;illustrates&nbsp;how&nbsp;QueryPath&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;do&nbsp;the&nbsp;following:</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-doc">&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-doc">&nbsp;*&nbsp;-&nbsp;Make&nbsp;a&nbsp;robust&nbsp;HTTP&nbsp;connection&nbsp;to&nbsp;a&nbsp;remote&nbsp;server&nbsp;to&nbsp;fetch&nbsp;data.</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-doc">&nbsp;*&nbsp;-&nbsp;Using&nbsp;context&nbsp;to&nbsp;control&nbsp;the&nbsp;underlying&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-doc">&nbsp;*&nbsp;-&nbsp;Working&nbsp;with&nbsp;Linked&nbsp;Data.</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-doc">&nbsp;*&nbsp;-&nbsp;Work&nbsp;with&nbsp;XML&nbsp;Namespaces&nbsp;in&nbsp;documents.</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;*&nbsp;Using&nbsp;namespaces&nbsp;to&nbsp;access&nbsp;elements&nbsp;in&nbsp;selectors</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;*&nbsp;Using&nbsp;namespaces&nbsp;to&nbsp;access&nbsp;attributes&nbsp;in&nbsp;selectors</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;*&nbsp;Using&nbsp;namespaces&nbsp;to&nbsp;access&nbsp;attributes&nbsp;in&nbsp;XML&nbsp;methods.</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;code&nbsp;here&nbsp;connects&nbsp;to&nbsp;the&nbsp;DBPedia&nbsp;server&nbsp;and&nbsp;looks&nbsp;up&nbsp;the&nbsp;Linked</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;*&nbsp;Data&nbsp;stored&nbsp;there&nbsp;for&nbsp;a&nbsp;particular&nbsp;Wikipedia&nbsp;entry&nbsp;(any&nbsp;Wikipedia</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-doc">&nbsp;*&nbsp;wiki&nbsp;name&nbsp;should&nbsp;work&nbsp;here).</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-doc">&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;Examples</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;M&nbsp;Butcher&nbsp;&lt;matt@aleph-null.tv&gt;</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;LGPL&nbsp;The&nbsp;GNU&nbsp;Lesser&nbsp;GPL&nbsp;(LGPL)&nbsp;or&nbsp;an&nbsp;MIT-like&nbsp;license.</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;http://www.w3.org/DesignIssues/LinkedData.html</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;http://dbpedia.org</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;sparql.php</span></div></li>
<li><div class="src-line"><a name="a25"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;musicbrainz.php</span></div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a27"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-inc">require_once&nbsp;</span><span class="src-str">'../src/QueryPath/QueryPath.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a29"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a30"></a><span class="src-comm">//&nbsp;The&nbsp;URL&nbsp;to&nbsp;look&nbsp;up&nbsp;(any&nbsp;of&nbsp;these&nbsp;works):</span></div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-var">$url&nbsp;</span>=&nbsp;<span class="src-str">'http://dbpedia.org/data/The_Beatles.rdf'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a32"></a><span class="src-comm">//$url&nbsp;=&nbsp;'http://dbpedia.org/data/Swansea.rdf';</span></div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-comm">//$url&nbsp;=&nbsp;'http://dbpedia.org/data/The_Lord_of_the_Rings.rdf';</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-comm">//&nbsp;HTTP&nbsp;headers:</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-var">$headers&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a36"></a>&nbsp;&nbsp;<span class="src-str">'Accept:&nbsp;application/rdf,application/rdf+xml;q=0.9,*/*;q=0.8'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a37"></a>&nbsp;&nbsp;<span class="src-str">'Accept-Language:&nbsp;en-us,en'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a38"></a>&nbsp;&nbsp;<span class="src-str">'Accept-Charset:&nbsp;ISO-8859-1,utf-8'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a39"></a>&nbsp;&nbsp;<span class="src-str">'User-Agent:&nbsp;QueryPath/1.2'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a40"></a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a41"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a42"></a><span class="src-comm">//&nbsp;The&nbsp;context&nbsp;options:</span></div></li>
<li><div class="src-line"><a name="a43"></a><span class="src-var">$options&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a44"></a>&nbsp;&nbsp;<span class="src-str">'http'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a45"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'method'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'GET'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a46"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'protocol_version'&nbsp;</span>=&gt;&nbsp;<span class="src-num">1.1</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a47"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'header'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">&quot;\r\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$headers</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a48"></a>&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a49"></a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a50"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-comm">//&nbsp;Create&nbsp;a&nbsp;stream&nbsp;context&nbsp;that&nbsp;will&nbsp;tell&nbsp;QueryPath&nbsp;how&nbsp;to&nbsp;</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-comm">//&nbsp;load&nbsp;the&nbsp;file.</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-var">$cxt&nbsp;</span>=&nbsp;<a href="http://www.php.net/stream_context_create">stream_context_create</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a54"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a55"></a><span class="src-comm">//&nbsp;Fetch&nbsp;the&nbsp;URL&nbsp;and&nbsp;select&nbsp;all&nbsp;rdf:Description&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a56"></a><span class="src-comm">//&nbsp;(Note&nbsp;that&nbsp;|&nbsp;is&nbsp;the&nbsp;CSS&nbsp;3&nbsp;equiv&nbsp;of&nbsp;colons&nbsp;for&nbsp;namespacing.)</span></div></li>
<li><div class="src-line"><a name="a57"></a><span class="src-comm">//&nbsp;To&nbsp;add&nbsp;the&nbsp;context,&nbsp;we&nbsp;pass&nbsp;it&nbsp;in&nbsp;as&nbsp;an&nbsp;option&nbsp;to&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a58"></a><span class="src-var">$qp&nbsp;</span>=&nbsp;<a href="../QueryPath/_src---QueryPath---QueryPath.php.html#functionqp">qp</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">,&nbsp;</span><span class="src-str">'rdf|Description'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'context'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$cxt</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a59"></a><span class="src-comm">//$qp&nbsp;=&nbsp;qp('The_Beatles.rdf');</span></div></li>
<li><div class="src-line"><a name="a60"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a61"></a><a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;There&nbsp;are&nbsp;%d&nbsp;descriptions&nbsp;in&nbsp;this&nbsp;record.\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">size</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a62"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a63"></a><span class="src-comm">//&nbsp;Here,&nbsp;we&nbsp;use&nbsp;rdf|*&nbsp;to&nbsp;select&nbsp;all&nbsp;elements&nbsp;in&nbsp;the&nbsp;RDF&nbsp;namespace.</span></div></li>
<li><div class="src-line"><a name="a64"></a><span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">top</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">find</span><span class="src-sym">(</span><span class="src-str">'rdf|*'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a65"></a><a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;There&nbsp;are&nbsp;%d&nbsp;RDF&nbsp;items&nbsp;in&nbsp;this&nbsp;record.\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">size</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a66"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a67"></a><span class="src-comm">//&nbsp;Standard&nbsp;pseudo-classes&nbsp;that&nbsp;are&nbsp;not&nbsp;HTML&nbsp;specific&nbsp;can&nbsp;be&nbsp;used&nbsp;on&nbsp;</span></div></li>
<li><div class="src-line"><a name="a68"></a><span class="src-comm">//&nbsp;namespaced&nbsp;elements,&nbsp;too.</span></div></li>
<li><div class="src-line"><a name="a69"></a>print&nbsp;<span class="src-str">&quot;About:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">top</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">find</span><span class="src-sym">(</span><span class="src-str">'rdfs|label:first'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">text</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-id">PHP_EOL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a70"></a>print&nbsp;<span class="src-str">&quot;About&nbsp;(FOAF):&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">top</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">find</span><span class="src-sym">(</span><span class="src-str">'foaf|name:first'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">text</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-id">PHP_EOL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a72"></a><span class="src-comm">//&nbsp;Namespaced&nbsp;attributes&nbsp;can&nbsp;be&nbsp;retrieved&nbsp;using&nbsp;the&nbsp;same&nbsp;sort&nbsp;of&nbsp;delimiting.</span></div></li>
<li><div class="src-line"><a name="a73"></a>print&nbsp;<span class="src-str">&quot;\nComment:\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a74"></a>print&nbsp;<span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">top</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">find</span><span class="src-sym">(</span><span class="src-str">'rdfs|comment[xml|lang=&quot;en&quot;]'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">text</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a75"></a>print&nbsp;<span class="src-id">PHP_EOL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a76"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a77"></a><span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">top</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a78"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a79"></a>print&nbsp;<span class="src-str">&quot;\nImages:\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a80"></a><span class="src-key">foreach&nbsp;</span><span class="src-sym">(</span><span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">branch</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">find</span><span class="src-sym">(</span><span class="src-str">'foaf|img'</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$img</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;Note&nbsp;that&nbsp;when&nbsp;we&nbsp;use&nbsp;attr()&nbsp;we&nbsp;are&nbsp;using&nbsp;the&nbsp;XML&nbsp;name,&nbsp;NOT&nbsp;</span></div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;the&nbsp;CSS&nbsp;3&nbsp;name.&nbsp;So&nbsp;it&nbsp;is&nbsp;rdf:resource,&nbsp;not&nbsp;rdf|resource.</span></div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;The&nbsp;same&nbsp;goes&nbsp;for&nbsp;the&nbsp;tag()&nbsp;function&nbsp;--&nbsp;it&nbsp;will&nbsp;return&nbsp;</span></div></li>
<li><div class="src-line"><a name="a84"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;the&nbsp;full&nbsp;element&nbsp;name&nbsp;(e.g.&nbsp;rdf:Description).</span></div></li>
<li><div class="src-line"><a name="a85"></a>&nbsp;&nbsp;print&nbsp;<span class="src-var">$img</span><span class="src-sym">-&gt;</span><span class="src-id">attr</span><span class="src-sym">(</span><span class="src-str">'rdf:resource'</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-id">PHP_EOL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a86"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a87"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a88"></a>print&nbsp;<span class="src-str">&quot;\nImages&nbsp;Galleries:\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a89"></a><span class="src-key">foreach&nbsp;</span><span class="src-sym">(</span><span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">branch</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">find</span><span class="src-sym">(</span><span class="src-str">'dbpprop|hasPhotoCollection'</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$img</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a90"></a>&nbsp;&nbsp;print&nbsp;<span class="src-var">$img</span><span class="src-sym">-&gt;</span><span class="src-id">attr</span><span class="src-sym">(</span><span class="src-str">'rdf:resource'</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-id">PHP_EOL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a91"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a92"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a93"></a>print&nbsp;<span class="src-str">&quot;\nOther&nbsp;Sites:\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a94"></a><span class="src-key">foreach&nbsp;</span><span class="src-sym">(</span><span class="src-var">$qp</span><span class="src-sym">-&gt;</span><span class="src-id">branch</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">find</span><span class="src-sym">(</span><span class="src-str">'foaf|page'</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$img</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;print&nbsp;<span class="src-var">$img</span><span class="src-sym">-&gt;</span><span class="src-id">attr</span><span class="src-sym">(</span><span class="src-str">'rdf:resource'</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-id">PHP_EOL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a96"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a98"></a><span class="src-comm">//$qp-&gt;writeXML();</span></div></li>
</ol>
</span></div>
        <div class="credit">
		    <hr class="separator" />
		    Documentation generated on Thu, 19 Mar 2009 18:01:09 -0500 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.2</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>